import request from '@/utils/request'
export default{
  getChaptersAndVideos(courseId) {
    return request({
      url: `/admin/edu/chapter/getChapterAndVideos/${courseId}`,
      method: 'GET'
    })
  },
  save(chapter) {
    return request({
      url: '/admin/edu/chapter/save',
      method: 'POST',
      data: chapter
    })
  },
  getById(id) {
    return request({
      url: `/admin/edu/chapter/getById/${id}`,
      method: 'GET'

    })
  },
  update(chapter) {
    return request({
      url: '/admin/edu/chapter/update',
      method: 'PUT',
      data: chapter
    })
  },
  deleteById(id) {
    return request({
      url: `/admin/edu/chapter/deleteById/${id}`,
      method: 'DELETE'

    })
  }

}
